<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #alice {
            width: 100px;
            height: 100px;
            background-color: rebeccapurple;
            position: absolute;
            top: 100px;
            left: 100px;
        }
    </style>
</head>

<body>
    <div id="alice"></div>
    <script>
        document.getElementById("alice").animate(
            [
                { transform: "rotate(0) translate3D(-50%, -50%, 0)", color: "#000" },
                { color: "#431236", offset: 0.3 },
                { transform: "rotate(360deg) translate3D(-50%, -50%, 0)", color: "#000" },
            ],
            3000,
        );

    </script>
</body>

</html>